<template>
	<Company :companyList="companyList"></Company>
</template>

<script>
import { common } from '@/pagesA/utils/common.js';
import Company from './Company.vue';
export default {
	props: ['current', 'projectUuid'],
	components: {
		Company
	},
	data() {
		return {
			companyList: []
		};
	},
	watch: {
		current(newVal) {
			if (newVal == 1) {
				this.getOrganizationList();
			}
		}
	},
	methods: {
		getOrganizationList() {
			//获取参建公司
			let params = {
				projectUuid: this.projectUuid
			};
			!params.projectUuid && delete params.projectUuid;
			common.apis.projectSurvey.getOrganizationList(params).then((res) => {
				this.companyList = res.data;
			});
		}
	}
};
</script>

<style></style>
